package com.blockmeta.bbs.businesslibrary.util.navigation.impl;

import android.net.Uri;

import com.blockmeta.bbs.businesslibrary.arouter.RouterPath;
import com.blockmeta.bbs.businesslibrary.eventbus.XGPushEvent;
import com.blockmeta.bbs.businesslibrary.util.navigation.SimpleDeepLinkStrategy;

import org.greenrobot.eventbus.EventBus;

import java.util.Map;

/**
 * @author AirThor
 * @date 2019/7/25.
 * 社区-链吧tab
 * "blockmeta://chain8"
 */
public class Chain8Strategy extends SimpleDeepLinkStrategy {
    @Override
    public Uri uriTransformer(Uri uri) {
        return Uri.parse("blockmeta://chain8"+ RouterPath.MAIN_ACTIVITY);
    }

    @Override
    public Map<String, String> navigationParams(Uri uri) {
        return null;
    }

    @Override
    public boolean needSendEvents(Uri uri) {
        EventBus.getDefault().postSticky(new XGPushEvent(2, 0, XGPushEvent.COMMUNITY, null));
        return true;
    }
}
